<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
<title>培训机构信息查询</title>
<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/jquery.pagination.js"></script>
<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../js/public.js"></script>
<script type="text/javascript" src="../../js/alert.js"></script>
<script type="text/javascript" src="../../js/jquery-ui/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../js/jquery-ui/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="../../css/bootstrap.css">
</head>
<body>
	<div>
		<button type="button" onclick="addManage();" class="btn btn-success">添加账号</button>
	</div>
	</br>
	<table class="table table-bordered" id="datas">
		<tr>
			<td name="userId">账号</td>
			<td name="realName">账号持有人</td>
			<td name="school">所属驾校</td>
			<td name="authority">权限 </td>
			<td name="ip">最后登录IP地址</td>
		</tr>
	</table>
	<!-- 分页控件 -->
    <div class="pager">
    </div>
    
     <!-- 添加账号信息 -->
     <div id="addManageInfoDiv" style="display:none;" title="添加账号信息">
     	<iframe src="" style="width:100%;height: 100%" frameborder="no" marginwidth="0" marginheight="0" allowtransparency="yes"></iframe>
     </div>
     
     
    <script type="text/javascript">
		var href = location.href.split("=");
		var schoolId = href[1];
	
    	searchPage(1,10);
    	
    	//分页查询
    	function searchPage(pageNo,pageSize){
    		$.ajax({
    			url : "../../manage/getManageBySchoolId.ao",
    			type : 'POST',
    			data : {
    				"pageNo" : pageNo,
    				"pageSize" : pageSize,
    				"schoolId" : schoolId
    			},
    			beforeSend : ajaxstar,
    			complete : ajaxend,
    			cache : false,
    			dataType : "json",
    			success : function(data) {
    				if (data["state"] == "success") {
    					insertTr(data, 0);
    				} else {
    					sAlert(data["result"]);
    				}
    			}
    		});
    	}
    	
    	//添加账号信息
    	function addManage(){
			$("#addManageInfoDiv").find("iframe").attr("src","add.html?id="+schoolId);
			$("#addManageInfoDiv").dialog({
				title : "添加账号信息",
				resizable : false,
				width : 550,
				height : 400,
				resizable : true,
				modal : true,
				buttons : {
					"关闭" : function() {
						$(this).dialog("close");
					}
				}
			});
    	}
    	
    	function quit(){
    		$("#addManageInfoDiv").dialog("close");
    	}
    </script>
</body>
</html>